﻿using System;
using System.Collections.Generic;
using Meqs.Entity;
using System.Collections;
using Meqs.Entity.Views;

namespace Meqs.Logic.Interface
{
    public interface IStuCauseEvalHistoryLogic : ICommonLogic<StuCauseEvalHistory, int>
    {
        int FindTeacherCount(Hashtable ht);

        /// <summary>
        /// 查询带有课程名的学分总记录
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <returns></returns>
        IList<VStuCauseEvalHistory> FindByCauseName(string schoolMark, int schoolYear, int term);

        /// <summary>
        /// 获取学分评估的类型以及评估项信息
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="causeId"></param>
        /// <param name="typeId"></param>
        /// <returns></returns>
        IList<VStuCauseEvalHistoryTypeItem> FindWithTypeItme(string schoolMark, int schoolYear, int term, int historyId,int causeId, int typeId);

        /// <summary>
        /// 获取当前评价状态
        /// </summary>
        IList<StuCauseEvalState> GetState(int schoolYear, int term, String schoolMark, IList<int> clsList, int causeID);

        IList<StuCauseEvalState> GetState(int schoolYear, int term, String schoolMark, IList<int> clsList);

        IList<StuCauseEvalState> GetStateWithDate(int schoolYear, int term, String schoolMark, IList<int> clsList, String date);
        
        /// <summary>
        /// 获取评价历史记录
        /// </summary>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        StuCauseEvalHistory GetHistoryRecordByTerm(int schoolYear, int term, int causeID, string schoolMark);

        /// <summary>
        /// 更改status
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <returns></returns>
        int UpdateStatus(string schoolMark, int schoolYear, int term);
        int UpdateStatus(string schoolMark, string ids, int schoolYear, int term);
        int UpdateStatus(string schoolMark, int historyId, int schoolYear, int term, int status);


        /// <summary>
        /// 插入一条
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="causeId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int InsertNew(string schoolMark, int schoolYear, int term, int causeId, int userId);
    }
}